<template>
    <div id='' class='system_set_form'>
        <Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="80">
            <FormItem label="名称" prop="name">
                <Input v-model="formValidate.name" show-word-limit maxlength="50" placeholder="请输入名称"></Input>
            </FormItem>
            <FormItem label="备注">
                <Input v-model="formValidate.remarks" placeholder="请输入备注"></Input>
            </FormItem>
        </Form>
    </div>
</template>
<script>
export default {
    name: '',
    props: [''],
    data() {
        return {
            formValidate: {
                name: '',
                remarks: ''
            },
            ruleValidate: {
                name: [
                    { required: true, message: '请输入名称', trigger: 'blur' }
                ]
            }
        };
    },
    components: {},
    computed: {},
    beforeMount() { },
    mounted() { },
    methods: {
        handleSubmit(cb) {
            this.$refs['formValidate'].validate((valid) => {
                if (valid) {
                    if (cb) {
                        cb(this.formValidate)
                    }
                } else {
                    this.$Message.error('请填写名称!');
                }
            })
        },
        handleReset() {
            this.$refs['formValidate'].resetFields();
        },
        assignData(row) {
            this.formValidate = { ...row }
        }
    },
    watch: {}
}
</script>
<style lang='less' scoped>
</style>
